package com.summer.test.controller;

import java.util.List;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.summer.core.annotations.ScopeType;
import com.summer.core.controller.EntityQuery;
import com.summer.test.model.ManyBean;

@Component
@Scope(ScopeType.VIEW)
public class ManyBeanList extends EntityQuery<ManyBean> {

	private final String hql = "from ManyBean manyBean";
	private final String countHql = "select count(manyBean) from ManyBean manyBean";
	
	public ManyBeanList() {
		
		setHql(hql);
		setCountHql(countHql);
	}
	
	public List<ManyBean> getAllManyBean() {
		
		return getHt().find("from ManyBean manyBean");
	}
}
